odhcpd: change "-c" cmd line arg to take a dir
authorDavid Härdeman <[email protected]>
Sat, 25 Oct 2025 13:32:06 +0000 (15:32 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Sat, 25 Oct 2025 15:31:54 +0000 (17:31 +0200)
commitf49574e42e78cff0eeeb4d00e62b875c915e9511
treec510d9266cf40c04aa41ad06f329645f6104e0d0
parent0900202c27543f1ae81ce99a18cd3fd145966c0f
odhcpd: change "-c" cmd line arg to take a dir

After the TZ support was added, odhcpd now reads two cfg files
potentially. Instead of adding a separate switch for the system UCI
file, I've changed the "-c" argument to take a directory. This is more
future-proof and also serves as a preparation for the global DUID PR
(which will necessitate reading from the UCI "network" file as well).

While I was at it, I also made some tiny improvements to the
odhcpd_reload() function to avoid an unnecessary allocation.

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/291
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/config.c
src/odhcpd.c
src/odhcpd.h